package simulador.adsd.biblioteca.digital.modelo;

import simulador.adsd.biblioteca.digital.util.SystemConstants;
import eduni.simjava.Sim_stat;
import eduni.simjava.Sim_system;

public class Main {
	
	public static void main(String[] args) {
		Sim_system.initialise();
		
		Sim_system.add(new Source("fonte", 10, 10, 10));
		Sim_system.add(new ServidorGerenciador("gerenciador",0));
		Sim_system.add(new ServidorUpload("upload"));
		Sim_system.add(new ServidorDownload("download"));
		
		Sim_system.link_ports(SystemConstants.NOME_FONTE, SystemConstants.NOME_SAIDA_GERENCIADOR
				, SystemConstants.NOME_GERENCIADOR, SystemConstants.NOME_IN_GERENCIADOR);
		
		Sim_system.set_trace_detail(true, true, true);
		
		Sim_system.set_report_detail(false, false);
		// Sim_system.generate_graphs("supermercado.sjg");

//		Sim_system.set_termination_condition(Sim_system.INTERVAL_ACCURACY,
//				Sim_system.IND_REPLICATIONS, SystemConstants.CONFIDENCE_LEVEL,
//				SystemConstants.ACCURACY, "atendente", Sim_stat.THROUGHPUT);

		Sim_system.run();

		
	}

}
